#include "main.h"
#include <adc.h>
#include "power.h"

float OutputVoltage()
{
    int result;
    ConvertADC();         // Start conversion
    while( BusyADC() );   // Wait for completion
    result = ReadADC();   // Read result
    nop();
    return result * ADC_REF / 1024;
}

